<!--
@author	Yi Bo <etng2004@gmail.com>
@version	$Id: announce_list.php 23 2007-08-28 10:08:53Z etng2004 $
@copyrithg	2006-2007 ETE.CN
@license 	PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
-->
<?php
$this->declareVars();
echo $this->render('header.php');
/*$this->dump($this->pager);
$this->dump($this->announces);*/
?>
<?php
if(sizeof($this->announces)):
foreach ($this->announces as $announce):
?>
<h3>
<a href="<?php echo $this->base_url;?>/view/id/<?php echo $announce['id']; ?>"><?php echo $announce['title']; ?></a>
</h3>
<?php echo date('Y-m-d', $announce['created_at']); ?>
<div class="content">
<?php echo $announce['content']; ?>
</div>
<a href="<?php echo $this->base_url;?>/edit/id/<?php echo $announce['id']; ?>">编辑</a>
<a href="<?php echo $this->base_url;?>/remove/id/<?php echo $announce['id']; ?>">删除</a>
有效时间：<?php echo $announce['published_at'] == 0?'创建时即可生效':date('Y-m-d', $announce['published_at']); ?>至<?php echo $announce['expired_at'] == 0?'永不失效':date('Y-m-d', $announce['expired_at']); ?>
<hr />
<?php
endforeach;
else:
?>
暂时没有公告！
<?php
endif;
?>
<?php

?>

<a href="<?php echo $this->base_url;?>/add/">新增</a>
<?php echo $this->render('footer.php');?>